DC12RotCut

D = Device( camming3, camming4)

C = Calculation functions

GENERAL DESCRIPTION

The DC12RotCut function execute the necessary calculations and provides for the writing of the cam table to a CAMMING3 or CAMMING4 devices to execute a circular fly cut.
In particular the function manages the control of an axis (Slave) consisting of a single or multi blade cutting cylinder (maximum 6 blades) by syncing it to the material to be cut by reading the count given by an encoder (Master) placed on the material.
The function has the possibility (opzional) to re-adjust the cutting counting rotary axis (Slave) through a power input that can be plain or to interrupt, placed in a known point of the same axis path.
The function also has the ability to synchronize the cut on material via a photocell, positioned before cutting, reading a notch on the material.

Picture 1

DETAILED DESCRIPTION

The Slave axis resolution (measure and pulse parameters) should be set so that the unit of measurement of the counter is in degrees, degrees/10, degrees/100 or degrees/1000.
The “Synchronous space” parameter (aslParam[6]) establishes how much space (in degrees) the shearing cylinder keeps his peripheral speed equal to the speed of the line (cutting stroke).
In the space between the cuts, the shearing cylinder accelerates or decelerates his run in order to be ready to meet the next cut. If the workpiece is great, It is likely that these intermediate spaces, the shearing cylinder making a stop. The stop is always in the midpoint between a blade and the subsequent (in the case of a single blade, in the half cylinder on the side opposite the blade).
In the configuration file must be configured (in any case) also a COUNTER3 device that is used by the function to manage the photocell on the material. This device will have input encoders count as a reference of the master.
The function should be placed on a point of the application that runs continuously (every logical round of Qmove). To attach the Slave to Master simply give a STARTCAM command after you execute the preset.

PRESET

The preset operation (zero point search) of the cutting cylinder axis, must be done at every system power-up. The preset uses a sensor whose declaration must be made in the configuration of the CAMMINGx device, on the configuration file. This sensor (that can be the same as the one used for power factor correction of the axis) must be declared as “IAZero” (enable input zero pulse).
The preset must reset the count (or upload a share), so when the count value is 0 the blade (or one of the blades) you are exactly on the cutting point (see the picture 1)
Dopo l'operazione di Preset, si deve comandare un posizionamento dell'asse cilindro alla quota:
QUOTA_POS = ANG_GIRO - (SPAZIO_SYNC/2)
Where:
ANG_GIRO = 360° (in the unit of used measure, 360 if degrees, 3600 if tenths, etc…)
SPACE_SYNC = is the aslParam[6] parameter (“Synchronous space”)
For clarification see the examples below.

CUTTING CYLINDER AXIS PHASE CORRECTION

Cutting cylinder axis can be phase corrected at every turn through a digital input normal or fast (interrupt).
Tha phase correction It is useful in all cases where the encoder resolution (ratio of the number of pulses/Rev encoder and peripheral space path from shearing cylinder), It is not a finite number, or in the case that there's some slippage between the movement of the cylinder and the encoder shaft.
A limitation of the power input is when you use a single blade cylinder. In this case it is necessary that at the moment of the activation of the phase correction sensor, the cutting cylinder with the blade during cutting phase (and that is, while it is executing the synchronism).

SYNCHRONIZATION ON THE MATERIAL VIA PHOTOCELL

There is the possibility to synchronize the cutting of the material with a notch on the material (aslParam[11] = 1).
The notch is detected by a photocell fast entering as Qmove interrupt. The photocell makes sure that the system takes into account any material slips on your encoder, using the notch as a position reference. In the case, on a piece, the notch is placed is found executing the length of the piece set, plus any fix detected in the previous piece.
In the case of use of the photocell detecting notch on material, you no longer need to give the command to STARTCAM to the slave,as the engagement is done automatically at the first mark detected.

SPEED GRAPH-TIME OF THE CIRCULAR CUTTING CAM (Picture 2)

IMPLEMENTAZIONE

DC12RotCut (cmCam, cnContM, aslParam, sfChangeExe, sbError)

Parameters:

The array “aslParam” must be at least 16 elements
Master = Axis which carries the material of line
Slave = Cutting cylinder axis

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
IN CAMMING3
CAMMING4
CmCam Device type to which you can apply the function
IN COUNTER3 cnContM Type of device to be declared in the configuration file (required)
IN ARRSYS aslParam[1] L Length of workpiece (UM Master)
IN ARRSYS aslParam[2] L Number of blades into the cutting cylinder [1 ÷ 6]
IN ARRSYS aslParam[3] L Cylinder cutting radius (UM Master) (for calculating speed in the synchro stretch)
IN ARRSYS aslParam[4] L UM Slave (1=degrees, 10=tenths degrees, 100=cents degrees, 1000=housandths degrees)
IN ARRSYS aslParam[5] L Ramp type fpr acc/decel Slave (0=trapezoidal, 1=epicycloidal)
IN ARRSYS aslParam[6] L Synchro Slave Spazio of speed for the cut (UM Slave)
IN ARRSYS aslParam[7] L Input type of Slave correction (0=none, 1=interrupt input, 2=normal input)
IN ARRSYS aslParam[8] L Edge of the input power factor correction (0=descent, 1=ascent)
IN ARRSYS aslParam[9] L Value to load on the counter to the phase correction sensor activation (UM Slave)
IN ARRSYS aslParam[10] L Percentage of extra speed of shearing cylinder from the line, in the stretch at constant speed (%) [-99 ÷ 99]
IN ARRSYS aslParam[11] L Input type to catch notch on material (0=none, 1=interrupt input)
IN ARRSYS aslParam[12] L Edge of the input for the dell'ingresso per la catch notch on material (0=descent,1=ascent) (*)
IN ARRSYS aslParam[13] L Distance between notch photocell and the center cutting cylinder (UM master) (*)
IN ARRSYS aslParam[14] L On the workpiece: Distance between the notch and the end of the piece. (UM Master) (*)
IN ARRSYS aslParam[15] L 'CodeM' value to set on the cut sector. This value can be read during dynamic operation on 'codeMex'. variables (the values: -99 and -100 are used internally to the function and cannot be set)
IN ARRSYS aslParam[16] L Maximum line speed (UM master/sec)
IN ARRSYS aslParam[17] L Sampling time of the camming device (msec)
OUT SYSTEM sfChangeExe F Flag that when is to 1 indicates that the change of parameters on the fly is in executing. Once completed the Exchange parameters, the flag back to 0.
OUT SYSTEM sbError B Variable containing the eventual error arising from the function (see the chapter)

(*) = Optional. To revert only when using a photocell to read the notch on the material.

Error

At each call of the function if errors, these are shown on the error variable (referred to as “sbErrore” on the table).
The values of the variables from 10 onwards are considered “warnings”, reports that do not cause an emergency to the Slave axis. The values below 10, affect the operation causing, in the event of an outbreak in dynamic phase, a stop of the axis.
The error variable must never be reset (the function executes automatically when there are no more errors).
The meaning of these values is summarized below:
0: No errors
1: Incorrect Slave units of measurement
2: Incorrect measurement of radius or number of blades
3: Incorrect Slave axis resolution
4: Too small Synchronous space (aslParam[6] parameter)
5: Too small Master Space (of material) between a stretch of synchronism and the other
6: Incorrect Synchronous space (aslParam[6] parametr)
7: Incorrect Percentage of speed (aslParam[10] parameter) in a stretch of synchronism
10: Warning: Phase correction is not possible (Synchronous sector too small)
11: Warning: Synchronous Space incorrect (parameter change impossible)
12: Warning: Percentage of extra speed cut incorrect (parameter change impossible)
13: Warning: Too small Master Space (of material) between a stretch of synchronism and the other
14: Warning: Negative Master Space. Proceed with minor variations
15: Warning: Too small Vkost Space
16: Warning: Analog saturation Slave during the stretch out of sync

Operation notes

Esempio

CONFIGURAZIONE DEI DEVICES NEL FILE DI CONFIGURAZIONE

Nel file di configurazione devono essere configurati due device. Un CAMMING3 (o 4) e un COUNTER3. Eccoli descritti di seguito:

;                        TCamp  CountS  CountMA CountMB IntL IAZero IntLM IAZeroM  InG   InGInt  IoutA   Out
cmCam CAMMING3  1     2.CNT02  2.CNT01     X.X      1   2.INP01   X        X.X    2.INP08 1     2.AN02  X.X

;                                TCamp    Count      IntL     IAZero  InG  InGInt
cnContM  COUNTER3       1       2.CNT01     2         X.X          X.X

IMPLEMENTAZIONE DELLA FUNZIONE SU UN TASK

SENZA FOTOCELLULA SU MATERIALE

INIT:
aslParam[1] = 10000	;Lunghezza pezzo (UM Master)
aslParam[2] = 3		;Numero lame di taglio nel cilindro di taglio
aslParam[3] = 4000	;Raggio del cilindro di taglio (per tratto a vel kost)(UM Master)
aslParam[4] = 10	;UM (10=decimi di grado)
aslParam[5] = 0		;Tipo di rampe (0=trapez.)
aslParam[6] = 400	;Spazio di sincronismo per taglio (40°)
aslParam[7] = 1		;Tipo di rifasamento (1=ingresso ad interrupt)
aslParam[8] = 1		;Fronte dell'ingresso di rifasamento (1=salita)
aslParam[9] = 0		;Quota da caricare su sensore di rifasam. (gradi/10)
aslParam[10] = 5	;Percentuale di vel in + o - nel tratto di sincronismo (% vel sync)
aslParam[11] = 0	;Tipo di ingresso per la cattura tacca su materiale (0=nessuno)
aslParam[12] = 0	;Non utilizzato
aslParam[13] = 0	;Non utilizzato
aslParam[14] = 0	;Non utilizzato
aslParam[15] = 1000	;Valore di codeM da impostare sul settore di taglio
aslParam[16] = 10000	;Velocità massima Linea (1000 UMMaster/sec)
aslParam[17] = 2	;Tempo di campionamento del device "cmCam"
 
 
MAIN:
 
DC12RotCut (cmCam, cnContM, aslParam, sfChangeExe, sbErrore)	;Chiamata a funzione
 
IF ifPreset							;Gestione Preset
	IF gfFrn01
		gfFrn01 = 0
		IF (NOT cmCam:st_camex)
		PRESET cmCam
		gfPresetOn = 1
	ENDIF
ENDIF
ELSE
	gfFrn01 = 1
ENDIF
 
IF gfPresetOn							;Posizionamento dopo il Preset
	IF cmCam:st_prsok
		cmCam:setpos = 3600 - (aslParam[6] / 2)	        ;Quota_pos = ang_giro - (spazio_sync/2)
		cmCam:setvel = (10 * cmCam:maxvel) / 100	;10% di vel.max.
		START cmCam
		gfPresetOn = 0
	ENDIF
ENDIF
 
IF ifStart                  					;Gestione ingresso di start
	IF gfFrn02
		gfFrn02 = 0
		IF (NOT cmCam:st_camex) AND (NOT sbErrore)
            		STARTCAM cmCam
		ENDIF
        ENDIF
ELSE
	gfFrn02 = 1
ENDIF
 
IF ifStop			        			;Gestione ingresso di stop
	IF gfFrn03
		gfFrn03 = 0
		IF cmCam:st_camex
         		STOPCAM cmCam
		ENDIF
        ENDIF
ELSE
	gfFrn03 = 1
ENDIF
 
WAIT 1
JUMP MAIN
 
END

CON FOTOCELLULA SU MATERIALE

INIT:
aslParam[1] = 10000	;Lunghezza pezzo (UM Master)
aslParam[2] = 3		;Numero lame di taglio nel cilindro di taglio
aslParam[3] = 4000	;Raggio del cilindro di taglio (per tratto a vel kost)(UM Master)
aslParam[4] = 10	;UM (10=decimi di grado)
aslParam[5] = 0		;Tipo di rampe (0=trapez.)
aslParam[6] = 400	;Spazio di sincronismo per taglio (40°)
aslParam[7] = 1		;Tipo di rifasamento (1=ingresso ad interrupt)
aslParam[8] = 1		;Fronte dell'ingresso di rifasamento (1=salita)
aslParam[9] = 0		;Quota da caricare su sensore di rifasam. (gradi/10)
aslParam[10] = 5	;Percentuale di vel in + o - nel tratto di sincronismo (% vel sync)
aslParam[11] = 1	;Tipo di ingresso per la cattura tacca su materiale (1=inp interr.)
aslParam[12] = 1	;Fronte dell'ingresso per la cattura tacca su materiale (1=salita)
aslParam[13] = 1000	;Distanza tra la fotocellula di rilevamento tacca e il centro del cilindro di taglio
aslParam[14] = 200	;Sul pezzo da tagliare: Distanza tra la tacca e la fine del pezzo (UM Master)
aslParam[15] = 1000	;Valore di codeM da impostare sul settore di taglio
aslParam[16] = 10000	;Velocità massima Linea (1000 UMMaster/sec)
aslParam[17] = 2	;Tempo di campionamento del device "cmCam"
 
MAIN:
 
IF gfStart  AND cmCam:st_prsok
      DC12RotCut (cmCam, cnContM, aslParam, sfChangeExe, sbErrore)	;Chiamata a funzione 
ENDIF
 
;gfStart è un flag che mi indica che lo Slave è abilitato a ricevere uno start e a fare il movimento automatico
;(La funzione si incarica anche dello start che avviene al primo impulso di fotocellula)
 
IF ifPreset							;Gestione Preset
	IF gfFrn01
		gfFrn01 = 0
		IF (NOT cmCam:st_camex)
        		PRESET cmCam
	        	gfPresetOn = 1
		ENDIF
        ENDIF
ELSE
	gfFrn01 = 1
ENDIF
 
IF gfPresetOn							;Posizionamento dopo il Preset
	IF cmCam:st_prsok
 
		cmCam:setpos = 3600 - (aslParam[6] / 2)	        ;Quota_pos = ang_giro - (spazio_sync/2)
		cmCam:setvel = (10 * cmCam:maxvel) / 100	;10% di vel.max.
		START cmCam
		gfPresetOn = 0
	ENDIF
ENDIF
 
IF ifStop				        		;Gestione ingresso di stop
	IF gfFrn03
		gfFrn03 = 0
		IF cmCam:st_camex
          		STOPCAM cmCam
		ENDIF
        ENDIF
ELSE
	gfFrn03 = 1
ENDIF
 
WAIT 1
JUMP MAIN
 
END